# Carbon Jiao <http://archlive-pkg.googlecode.com>

pkgname=libfm-git
pkgver=20100928
pkgrel=1
url="http://pcmanfm.sourceforge.net/"
pkgdesc="Libs also excutable standalone progs, for next generation File manager of the LXDE Desktop"
arch=('i686' 'x86_64')
license=('GPL')
depends=('udisks' 'gtk2>=2.16.0' 'glib2' 'menu-cache')
optdepends=(
	'gvfs: To sccess remote file systems.'
	)
makedepends=('git' 'intltool' 'pkgconfig' 'autoconf' 'perl' 'gtk-doc')
provides=('libfm' )
conflicts=('libfm')
replaces=()
#source=(libfm.png libfm.desktop)

_gitroot="git://pcmanfm.git.sourceforge.net/gitroot/pcmanfm/${pkgname%-git}"
_gitname="${pkgname%-git}"

build() {

msg "Connecting to GIT server...."
cd $startdir
if [ -d $_gitname ] ; then
	cd $_gitname && git pull origin
	msg "The local files are updated."
else
	git clone $_gitroot
fi

[ -d $srcdir/${_gitname}-build ] && rm -rf $srcdir/${_gitname}-build
git clone $startdir/${_gitname} $srcdir/${_gitname}-build

msg "GIT checkout done or server timeout"

msg "Start to build..."
cd $srcdir/${_gitname}-build
sh ./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --enable-udisks --with-gnu-ld || return 1
make || return 1
make DESTDIR="$pkgdir/" install
#mv $pkgdir/usr/bin/{libfm-demo,libfm}
#install -Dm644 $srcdir/${_gitname}.png $pkgdir/usr/share/pixmaps/${_gitname}.png
#install -Dm755 $srcdir/${_gitname}.desktop $pkgdir/usr/share/applications/${_gitname}.desktop
}
#md5sums=('bed012ad4d185fe8e5222fb94de6d61d'
#         'b5223e3119d88f7259390bb641f2858f')
